﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ZenSystemService.Api.Migrations
{
    /// <inheritdoc />
    public partial class UserStatus : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ExamineIsAdopt",
                table: "Users");

            migrationBuilder.AddColumn<int>(
                name: "PaymentStatus",
                table: "TraineeOrders",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "SalesUserId",
                table: "TraineeOrders",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CoachId",
                table: "TraineeOrderDetails",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TraineeId",
                table: "TraineeOrderDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "CoachId",
                table: "TraineeCourseSurpluss",
                type: "int",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PaymentStatus",
                table: "TraineeOrders");

            migrationBuilder.DropColumn(
                name: "SalesUserId",
                table: "TraineeOrders");

            migrationBuilder.DropColumn(  
                name: "CoachId",
                table: "TraineeOrderDetails");

            migrationBuilder.DropColumn(
                name: "TraineeId",
                table: "TraineeOrderDetails");

            migrationBuilder.DropColumn(
                name: "CoachId",
                table: "TraineeCourseSurpluss");

            migrationBuilder.AddColumn<bool>(
                name: "ExamineIsAdopt",
                table: "Users",
                type: "tinyint(1)",
                nullable: true);
        }
    }
}
